// Ofri Keidar 302933981 group 05

/**
 * Interface of system's model. Class that implements this interface should manage system's database and support queries. 
 */

package model;

import java.util.LinkedList;
import java.util.Map;
import model.apartment.*;
import model.building.Building;

public interface Model {

	/**
	 * Gets list of type for new building's apartments, list of maps of apartments' parameters and new building's address.
	 * Creates a new building with these apartments at given address
	 * @param apartmentTypes- list of apartments' types
	 * @param parameterList- list of map of parameters for each apartment
	 * @param stName- building's street name
	 * @param bldNumber- building's number on street
	 */
	public void addNewBuilding(LinkedList<String> apartmentTypes, LinkedList< Map<String, String> > parameterList, String stName, int bldNumber);
	
	/**
	 * Returns map of all flats in database- key is flat and value is String
	 * containing flat number in its building and its building address 
	 * @return
	 */
	public Map<Flat, String> getAllFlats();
	
	/**
	 * Returns map of all garden apartments in database- key is garden apartment and value is String
	 * containing garden apartment's number in its building and its building address
	 * @return
	 */
	public Map<GardenApartment, String> getAllGardenAprtmnts();
	
	/**
	 * Returns map of all penthouses in database- key is penthouse and value is String
	 * containing penthouse's number in its building and its building address
	 * @return
	 */
	public Map<Penthouse, String> getAllPenthouses();
	
	/**
	 * Returns map of all vacant apartments in database- key is vacant apartment and value is String
	 * containing vacant apartment's number in its building and its building address
	 * @return
	 */
	public Map<Apartment, String> getVacantApartments();
	
	/**
	 * Returns building at given address
	 * @param stName- name of building's street
	 * @param bldNumber- number of building on street
	 * @return building at given address or null if there is not a building at given address
	 */
	public Building getBuilding(String stName, int bldNumber);

	/**
	 * Save modified data to database, then system is ready to shut down
	 * @return- True if shut down successfully, False if not
	 */
	public boolean shutDownSystem();
}
